package com.yun.zf.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.app.domain.SysRateDiscount;
import com.yun.zf.common.admin.model.pact.RateDiscountMo;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * <p>
 * 佣金折扣表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-04-15
 */
public interface SysRateDiscountService extends IService<SysRateDiscount> {

    /**
     *  设置折扣过期时间为30天，见redis配置
     * @param provCode
     * @param cityCode
     * @param type
     * @param communityId
     * @return
     */
    @Cacheable( cacheNames = {"discount"},key = "#provCode+'_'+#cityCode+'_'+#type+'_'+#communityId")
    public List<RateDiscountMo> getDiscount(Long provCode, Long cityCode, String type, Long  communityId);
}
